function multi_add(varargin)

global PATHS
[drive, path, ext] = getdriveext;
exts = '*.mat;*.pbm;*.scm;*.dat;*.hwf';
cd(path);
[fn, pn] = uigetfile( ...
    {exts, 'Datac files'}, ...
    'Open Data Files', 'MultiSelect', 'On');
if(isempty(fn) || isnumeric(fn))
    cd(PATHS.BP);
    return;
end;
setdriveext(pn); % reset to the current path.
if(iscell(fn))
    lfn = length(fn);
else
    lfn = 1; % just one entry
end;
for i = 1:lfn
    if(iscell(fn))
        fname = fn{i};
    else
        fname = fn;
    end;
    datac('open', [pn fname]);
    fprintf(1, '>%d: %s\n', i, fname);
    htag = findobj('Tag', 'NoteFile');
    if(~isempty(htag))
        lmax = length(cellstr(get(htag, 'string')));
        set(htag, 'min', 1);
        set(htag, 'max', lmax);
        set(htag, 'value', [1:lmax]);
        datac('auto_set', 1);
    end;
end;
cd(PATHS.BP);